/*
 * PhysicalProductBO.java
 *
 * Created on March 29, 2007, 1:12 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

//package edu.byu.isys413.pb88.data;
package finalintex2web;
/**
 *
 * @author Owner
 */
public class PhysicalProductBO extends ProductBO 
{
    
   
   private boolean dirty;
   private boolean alreadyInDB;
   private String serialNumber;
   private String shelfLocation;
   private String DatePurchased;
   private boolean sale;
   
    /** Creates a new instance of PhysicalProductBO */
   
    public PhysicalProductBO(String id) 
    {
        super(id);
    
    }
    /**
     * This method enables us to know if the object is dirty. If the object is dirty then we need to update it in the database.
     *If the object is not dirty then we dont need to update the object in the database.
     * @return 
     */
    public boolean isDirty() {
        return dirty;
    }
    
    /**
     * 
     * @param dirty 
     * Sets the object as dirty or not dirty depending on the parameter passed.
     */
    
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }
    
    /**
     * @return boolean indb 
     * This method is to check if this object is already set in the database or not.
     *
     */
    
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }
    
    /**
     * @param indb
     * Sets the indb variable to whatever is passed in indb.
     *This method is to tell the object that this object has already been saved or not saved in the database. 
     */
    public void setAlreadyInDB(boolean alreadyInDB) 
    {
        this.alreadyInDB = alreadyInDB;
    }
    /*This method returns the serial number of the physical product
     *@return serialNumber
     *
     */
    public String getSerialNumber() {
        return serialNumber;
    }

    /*This method sets the serial number of the physical product
     *@param serialNumber
     *
     */
    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    /*This method returns the shelf location of the physical product
     *@return shelf location
     *
     */
    public String getShelfLocation() {
        return shelfLocation;
    }
    
    
    /*This method sets the shelf location of the physical product
     *@param shelf location
     *
     */
    public void setShelfLocation(String shelfLocation) {
        this.shelfLocation = shelfLocation;
    }

    
    /*This method returns the date purchased of the physical product
     *@return datePurchased
     *
     */
    public String getDatePurchased() {
        return DatePurchased;
    }
    
    
    /*This method sets the date purchased of the physical product
     *@return date purchased
     *
     */

    public void setDatePurchased(String DatePurchased) {
        this.DatePurchased = DatePurchased;
    }

    
    /*This method returns if the physical product is for sale or not
     *@return boolean sale
     *
     */
    public boolean isSaleorRent() {
        return sale;
    }

    
    /*This method sets if the physical product is for sale or not
     *@param boolean sale
     *
     */
    public void setSaleorRent(boolean sale) {
        this.sale = sale;
    }
    
}
